package entity

import (
	"errors"
	"net/http"
	pgdb "gsc-datasets/internal/db/sqlc"
)

type CreateDatasetAnnotataionRequest struct {
	*pgdb.CreateDatasetAnnotationParams
}

func (s *CreateDatasetAnnotataionRequest) Bind(r *http.Request) error {
	if s.CreateDatasetAnnotationParams == nil {
		return errors.New("缺少CreateDatasetAnnotation字段")
	}
	return nil
}

type UpdateDatasetAnnotationRequest struct {
	*pgdb.UpdateDatasetAnnotationToLabelParams
}

func (s *UpdateDatasetAnnotationRequest) Bind(r *http.Request) error {
	if s.UpdateDatasetAnnotationToLabelParams == nil {
		return errors.New("缺少UpdateDatasetAnnotationToLabel字段")
	}
	return nil
}
